package com.forever7776.qiniu.rpc;

import com.alibaba.fastjson.JSONObject;
import com.forever7776.qiniu.core.rpc.QiNiuService;
import com.forever7776.qiniu.remote.rpc.QiNiuRpcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * <p>
 * 七牛上传
 * </p>
 *
 * @author kz
 * @date 2018-03-19
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class QiNiuRpcServiceImpl implements QiNiuRpcService {


    @Autowired
    private QiNiuService qiNiuService;


    @Override
    public JSONObject pic(MultipartFile multipartFile, String userId) throws IOException {
        return qiNiuService.pic(multipartFile, userId);
    }

}
